package wyklad;
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class PathServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      response.setContentType("text/html;charset=utf8");
      PrintWriter pw = response.getWriter();
      
      pw.println("<html>");
      pw.println("<head>");
      pw.println("</head>");
      pw.println("<body>");
      pw.println("<br/>nazwa: "+getServletName());
      pw.println("<br/>context path: "+request.getContextPath());
      pw.println("<br/>servlet path: "+request.getServletPath());
      pw.println("<br/>path info: "+request.getPathInfo());
      pw.println("</body>");
      pw.println("</html>");
      pw.close();
	}   	  	    
}